-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: replace Node.js 18 with Node.js 20 #1920
base: master
Are you sure you want to change the base?
Conversation
@Siegrift - looks like this can't be implemented without using The CI build error is:
When I did use |
I didn't know package manager check this field transitively. I assumed it's only for development/production purposes. I don't see a big issue with using |
I'm not sure about using Is it not a better plan to bump the Node version in |
Yeah, that's probably better. I still dislike the following:
|
Assuming there are breaking changes, then this is what major version bumps should typically be used for imo. i.e. commons v0.x supports Node 18 and commons v1.x supports Node 20. This is pretty much the standard process to my knowledge. If there aren't any obvious breaking changes, the easier option would be to allow both v18 and v20 in commons v0.x (like you suggested). I just don't really like us ignoring what commons says it supports |
Yeah, if there are breaking changes then definitely. I also saw some packages doing a major anytime they increase node version (or min node version) but I'd probably just use minor in that case. Created api3dao/commons#38 |
One alternative could be to support both with: "engines": {
"node": "^18.14.0 || ^20.10.0",
"pnpm": "^8.8.0"
}, and update the I tried Node.js 20 and it installed and built fine. Four tests failed within - await expect(throwingFunc).rejects.toEqual(new Error('SyntaxError: Unexpected identifier'));
+ await expect(throwingFunc).rejects.toThrow('SyntaxError: Unexpected identifier'); Even better- the change is backwards compatible to Node.js 18 so if incorporated, all tests pass for both versions. |
Is the thumbs up reaction agreement? If so, I can go ahead and implement what I wrote in the comment here for api3dao/commons#38 |
Yeah. I've edited the previously created issue api3dao/commons#38 and assigned you. |
@Siegrift - with api3dao/commons#40 merged, can you do a minor commons release in order for me to continue with this? |
I really do not understand what is happening with these E2E tests. Everything is fine with Node v18. Here with Node v20, the following happens with the 4 E2E suites that are run as part of the Actions matrix:
The error is always
It might have something to do with axios/axios#5929? Still investigating |
axios * @api3/airnode-adapter: ^1.6.2 → ^1.6.7
hardhat * @api3/airnode-adapter: ^2.19.3 → ^2.19.5 * @api3/airnode-examples: ^2.19.3 → ^2.19.5 * @api3/airnode-operation: ^2.19.3 → ^2.19.5 * @api3/airnode-protocol: ^2.19.3 → ^2.19.5 * @api3/airnode-utilities: ^2.19.3 → ^2.19.5
This reverts commit 79b5f13.
@dcroote Did you have a chance to try out Node@22 ? |
I tried (locally) and same errors 😞 |
Closes #1918, implements #1910, and reverts the temporary #1873